#ifndef sprite_game_heart_h
#define sprite_game_heart_h

#import "head.h"

@class sprite_game_enemy;
@class sprite_game_swirl;

/*sprite_game_heart
*/
@interface SpriteGameHeart : CCSprite
{
	int type_;
	int heartPoint_;

	b2Body *box2dBody_;
	b2Fixture *box2dFixture_;

	CCSprite *image_;

	bool flagDark_;
	bool flagDie_;
	bool flagMouth_;
	bool flagMosquito_;
	bool flagSwirl_;
	sprite_game_enemy *enemyMosquitoHandle_;
	sprite_game_enemy *enemyMouthHandle_;
	sprite_game_swirl *swirlHandle_;
}

@property (nonatomic, readwrite) int heartPoint;
@property (nonatomic, readwrite) b2Body *box2dBody;
@property (nonatomic, readwrite) b2Fixture *box2dFixture;
@property (nonatomic, readwrite) bool flagDark;
@property (nonatomic, readwrite) bool flagDie;
@property (nonatomic, readwrite) bool flagMouth;
@property (nonatomic, readwrite) bool flagMosquito;
@property (nonatomic, readwrite) bool flagSwirl;
@property (nonatomic, readwrite, assign) sprite_game_enemy *enemyMosquitoHandle;
@property (nonatomic, readwrite, assign) sprite_game_enemy *enemyMouthHandle;
@property (nonatomic, readwrite, assign) sprite_game_swirl *swrilHandle;

- (id)initSpriteGameHeart:(int)HearPoint;
- (void)dealloc;
- (void)tick:(ccTime)Time;
- (void)tickDisapper:(ccTime)Time;

/*box2d control
*/
- (void)CreateBody;
- (void)DestroyBody;
- (b2Vec2)ComputeBodyPosition;

/*game state control
*/
- (void)Pause;
- (void)Resume;

/*when check collision, return if is heart fixture
*/
- (bool)IsMyFixture:(b2Fixture *)Fixture;

/*paly animation
*/
- (void)PlayAni:(int)Type;

/*action
*/
- (void)ActionToturial;
- (void)ActionDie;
- (void)ActionEat;
- (void)ActionDark;
- (void)ActionMoveToSwirl:(sprite_game_swirl *)Swirl And:(CGPoint)StartPosition And:(CGPoint)EndPosition;

/*call back function
*/
- (void)CallBackAniDie:(id)Sender;
- (void)CallBackActionEatOver:(id)Sender;
- (void)CallBackMoveToSwirlOver:(id)Sender;

@end

/*sprite_game_star
*/
@interface sprite_game_star : CCSprite
{
	b2Body *box2dBody_;
	b2Fixture *box2dFixture_;

	CCSprite *image_;
}

- (id)initSpriteGameStar;
- (void)tick:(ccTime)Time;

/*box2d control
*/
- (void)CreateBody;
- (void)DestroyBody;
- (b2Vec2)ComputeBodyPosition;

- (bool)IsMyFixture:(b2Fixture *)Fixture;

- (void)HitStar;

- (void)ActionGet;
- (void)CallBackActionGet:(id)Sender;

@end

#endif